<style scoped lang="scss">


.page-title-bar {
  width: 10rem;
  height: 7vh;
  display: flex;
  @include flex-center;
  border-bottom: 1px solid rgba(41, 40, 37, 0.8);
  background: #161622;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;

  ul {
    width: 9rem;
    height: 7vh;
    display: flex;
    @include flex-space-between-center;
    color: $color-white;

    li {
      @include flex-center;

      h1 {
        font-size: .4267rem;
        font-weight: 400;
      }

      i {
        font-size: .4267rem;
      }
    }
  }
}

.placeholder {
  width: 10rem;
  height: 7vh;
  background-color: #161622;
}
</style>
<template>
  <div class="page-title-bar">
    <ul>
      <li @click="handleClick"><i class="iconfont icon-fanhui"></i></li>
      <li>
        <h1>
          {{ title }}
        </h1>
      </li>
      <li></li>
    </ul>
    <!-- 占位盒子 -->
  </div>
  <div class="placeholder"></div>
</template>
<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
const props = defineProps({
  title: {
    type: String,
    default: '头部标题组件'
  }
})
function handleClick(path) {
  console.log(path);
  // 返回上一页
  router.back()
}
</script>